home *** CD-ROM | disk | FTP | other *** search
/ Aminet 23 / Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso / Aminet / dev / amos / AMOS1097.lzh / AMOSLIST / 000046_amos-request@svcs1.digex.net_Fri Oct 3 11:12:08 1997.msg < prev    next >
Internet Message Format  |  1997-11-02  |  3KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
  2.     by mail2.access.digex.net (8.8.5/8.8.5) with ESMTP id LAA19168
  3.     for <mcox@access.digex.net>; Fri, 3 Oct 1997 11:12:06 -0400 (EDT)
  4. Received: (from daemon@localhost)
  5.     by svcs1.digex.net (8.8.5/8.8.5) id GAA01304
  6.     for amos-out; Fri, 3 Oct 1997 06:38:52 -0400 (EDT)
  7. Received: from mail4.access.digex.net (mail4.access.digex.net [205.197.247.2])
  8.     by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id GAA01301
  9.     for <amos-list@svcs1.digex.net>; Fri, 3 Oct 1997 06:38:51 -0400 (EDT)
  10. Received: from emma.talk-101.com (emma.talk-101.com [193.164.165.7])
  11.     by mail4.access.digex.net (8.8.5/8.8.5) with SMTP id GAA07419
  12.     for <amos-list@access.digex.net>; Fri, 3 Oct 1997 06:38:49 -0400 (EDT)
  13. Received: from [193.164.165.210] by emma.talk-101.com (NTMail 3.02.13) with ESMTP id ha059287 for <amos-list@access.digex.net>; Fri, 3 Oct 1997 10:06:08 +0100
  14. From: Anthony Sherratt <SHEZZOR@mail.talk-101.com>
  15. To: Amos-List <amos-list@access.digex.net>
  16. Date: Fri, 03 Oct 1997 10:04:53 +0500
  17. Message-ID: <yam7215.2695.2015244624@mail.talk-101.com>
  18. In-Reply-To: <199710030432.GAA00597@vux.alingsas.se>
  19. X-Mailer: YAM 1.3.4 [020] - Amiga Mailer by Marcel Beck
  20. Subject: Re: Sorting routine.
  21. MIME-Version: 1.0
  22. Content-Type: text/plain; charset=iso-8859-1
  23. X-Info: Talk-101 The Complete Business Internet Solution
  24. Content-Transfer-Encoding: 8bit
  25. X-MIME-Autoconverted: from quoted-printable to 8bit by svcs1.digex.net id GAA01302
  26. Status: O
  27. X-Status: 
  28.  
  29. >Hi!
  30.  
  31. Hi Peter
  32.  
  33. >Is there a smooth way to sort 20 variables???
  34.  
  35. If your using arrays (I think you are from the example) your better off
  36. to use 'for` loops.  Is this for a high score table ?  Anyways heres
  37. some example code.
  38.  
  39. Dim HISCORES(19),HINAME$(19) } At the beginning of the program 
  40.  
  41. For C=19 To 0 Step -1                      }  Checks where your
  42.    If SCORE>HISCORES(C) : POS=C : End If   }  score ranks in the
  43. Next C                                     }  high score table
  44. '
  45. For C=18 To POS Step -1
  46.    HISCORES(C+1)=HISCORES(C) : HINAME$(C+1)=HINAME$(C) } Knocks all the
  47. Next C                                     } down one from your pos
  48. '
  49. HISCORES(POS)=SCORE : HINAME$(POS)=NM$     }  Puts your details into
  50.                                            }  high score
  51.  
  52. If you need proper high score code then just email me personally and 
  53. I`ll give you some.
  54.  
  55. Anthony Sherratt
  56.  
  57. -- 
  58.  ï¿½    _       ____ ï¿½ ____`------------------------------------------�
  59.      /.\  ï¿½  / __/  / __,\      *http://www.talk-101.com/users/asp*
  60.   ,_/ ï¿½_\_ _/__ \_ /  ___/  O��������������������������������������O
  61.  ,_____/  Y_      Y_  ï¿½  ï¿½  o   #Monty The Wolf - OUT VERY SOON#     o
  62.   |   ï¿½   [ ] |   [ ] | -�- Oo.....................................O
  63.   :   :   *DESIGN*  :   :  ï¿½
  64.  
  65.